Accord Software, Inc.

tutorial01/str.c




/*
 * Accord Software, Inc.
 *
 * Tutorial 01 - CIDL file.
 *
 * This tutorial shows how strings are sent and
 * received in CIDL. 
 */

/*
 * Print the string received from the client and 
 * return "Hi Client!" to the client.
 */

char *
say_hello(s)
	char *s;
{
	static char *response;

	if (!response) {
		response = 
			(char *)malloc(strlen("Hi Client!")+1);
		strcpy(response, "Hi Client!");
	}
	
	printf("Client says = %s\n", s);
	return response;
}

[ Home | Tutorials | main.c | str.h ]
E-Mail:webmaster@accord.com
[P-042] Updated March 14, 1996
Copyright © 1993-1996 Accord Software, Inc. All rights reserved.